class Router < ActiveRecord::Base
  has_many :trains, :through => :train_router

  def self.findByTrainNumber trainNumber
    find(:first,:conditions => ['train_number = ?',trainNumber])
  end

  def self.findPage offset,limit
    find(
      :all,
      :offset => offset,
      :limit => limit
    )
  end
end
